package com.example.hometown_walker.service.redis;

import redis.clients.jedis.Jedis;

import java.util.Set;

/**
 * @description: Jedis连接redis
 * @author: chenchaoran
 * @date: 2020-04-01
 */
public class TestRedisClient {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("localhost");
//        jedis.auth("pass");
        System.out.println(jedis.ping());

        Set<String> keys = jedis.keys("*");
        keys.forEach(System.out::println);

        jedis.close();
    }
}
